import {requestClient} from '#/api/request';
import {dingTalkDeptAdjust} from "#/api/system/dept";

export async function findUserListPage(params) {
    return requestClient.get('/sys/user/list/page', {params});
}

export async function findUserList(params) {
    return requestClient.get('/sys/user/list', {params});
}

export async function findUserInfo(userId) {
    return requestClient.get('/sys/user/info', {params: {id: userId}});
}

export async function findUserRoleIds(params) {
    return requestClient.get('/sys/user/role-ids', {params});
}

export async function createUserInfo(data) {
    return requestClient.post('/sys/user/create', data)
}

export async function updateUserInfo(data) {
    return requestClient.put('/sys/user/update', data)
}

export async function updateBasicUserInfo(data) {
    return requestClient.put('/sys/user/update/basic', data)
}

export async function updatePassword(data) {
    return requestClient.put('/sys/user/update/password', data);
}

export async function userResetPassword(userId) {
    return requestClient.get('/sys/user/password/reset', {params: {id: userId}})
}

export async function removeUserInfo(id) {
    return requestClient.delete('/sys/user/remove', {params: {id}})
}
